var leadreportObj = {
    /**
     * 描述 : 下载csv报表
     * 作者 : Edgar.lee
     */
    'downLoad': function () {
        var params = {}, temp;

        $('#formSearch input').each(function () {
            temp = $(this);
            params[temp.attr('name')] = temp.val();
        });

        $.post('/leadreport/buildCsv', params, function (data) {
            window.open('/leadreport/downLoad?md5=' + data);
        });
    }
}

var sku_leadreportObj = {
    'sku_download': function () {

        var params = {}, temp;

        $('#formSearch input').each(function () {
            temp = $(this);
            params[temp.attr('name')] = temp.val();
        });

        $.post('/leadreport/sku_buildCsv', params, function (data) {
            window.open('/leadreport/sku_downLoad?md5=' + data);
        });
    }
}

var lastPurchaseObj = {
    'lastPurchase': function () {

        var params = {}, temp;

        $('#formSearch input').each(function () {
            temp = $(this);
            params[temp.attr('name')] = temp.val();
        });

        $.post('/leadreport/lastPurchaseBuild', params, function (data) {
            window.open('/leadreport/lastPurchase?md5=' + data);
        });
    }
}


var goMaxMinEveObj = {
    'goMaxMinEve': function () {

        var params = {}, temp;

        $('#formSearch input').each(function () {
            temp = $(this);
            params[temp.attr('name')] = temp.val();
        });

        $.post('/leadreport/goMaxMinEveBuild', params, function (data) {
            window.open('/leadreport/goMaxMinEve?md5=' + data);
        });
    }
}